
package com.probiz.estore.common.model.customer.base;

/*
 * Created on Tue May 09 09:54:33 CST 2006
 * 
 */
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import com.probiz.estore.common.model.customer.Membership;
import com.probiz.estore.common.model.system.AppRole;
import com.probiz.estore.common.model.system.AppUser;

/**
 * Membership Base Java Bean
 * 
 * This class is the base class for the model
 * 
 */

public class MembershipTbl extends com.probiz.estore.core.model.BaseObject	implements Serializable {

	private static final long	serialVersionUID	= 2422637055998571109L;

	protected Integer			membershipId;
	protected String			membershipName;
	protected String			membershipCode;
	protected String			membershipDetail;
	protected String			upgradeTips;
	protected Integer			membershipLevel;
	protected Integer			upgradeShopPoint;
	protected Integer			rank;
	protected Set<AppUser>		appUsers			= new HashSet<AppUser>();
	protected Set<AppRole>	appRoles= new java.util.HashSet<AppRole>();
	public Set<AppRole> getAppRoles() {
		return appRoles;
	}

	public void setAppRoles(Set<AppRole> appRoles) {
		this.appRoles = appRoles;
	}
	/**
	 * 
	 * Default Empty Constructor for class Membership
	 * 
	 */
	public MembershipTbl() {
		super();
	}

	/**
	 * 
	 * Default Key Fields Constructor for class Membership
	 * 
	 */
	public MembershipTbl(Integer in_membershipId) {
		this.setMembershipId(in_membershipId);
	}



	/**
	 * 
	 * @return Integer
	 */
	public Integer getMembershipId() {
		return this.membershipId;
	}

	/**
	 * Set the membershipId
	 */
	public void setMembershipId(Integer aValue) {
		this.membershipId = aValue;
	}

	/**
	 * 
	 * @return String
	 */
	public String getMembershipName() {
		return this.membershipName;
	}

	/**
	 * Set the membershipName
	 */
	public void setMembershipName(String aValue) {
		this.membershipName = aValue;
	}

	/**
	 * 
	 * @return String
	 */
	public String getMembershipDetail() {
		return this.membershipDetail;
	}

	/**
	 * Set the membershipDetail
	 */
	public void setMembershipDetail(String aValue) {
		this.membershipDetail = aValue;
	}

	/**
	 * 
	 * @return Integer
	 */
	public Integer getMembershipLevel() {
		return this.membershipLevel;
	}

	/**
	 * Set the membershipLevel
	 */
	public void setMembershipLevel(Integer aValue) {
		this.membershipLevel = aValue;
	}


	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof Membership)) {
			return false;
		}
		Membership rhs = (Membership) object;
		return new EqualsBuilder().append(this.membershipId, rhs.membershipId)
				.append(this.membershipName, rhs.membershipName).append(
						this.membershipDetail, rhs.membershipDetail).append(
						this.membershipLevel, rhs.membershipLevel).isEquals();
	}

	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(-82280557, -700257973).append(
				this.membershipId).append(this.membershipName).append(
				this.membershipDetail).append(this.membershipLevel).toHashCode();
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this).append("membershipId",
				this.membershipId)
				.append("membershipName", this.membershipName)
				.append("membershipDetail", this.membershipDetail)
				.append("upgradeTips", this.upgradeTips)
				.append("membershipLevel", this.membershipLevel)
				.toString();
	}

	/**
	 * Return the name of the first key column
	 */
	public String getFirstKeyColumnName() {
		return "membershipId";
	}

	public Integer getUpgradeShopPoint() {
		return upgradeShopPoint;
	}

	public void setUpgradeShopPoint(Integer upgradeShopPoint) {
		this.upgradeShopPoint = upgradeShopPoint;
	}

	public Set<AppUser> getAppUsers() {
		return appUsers;
	}

	public void setAppUsers(Set<AppUser> appUsers) {
		this.appUsers = appUsers;
	}

	public String getMembershipCode() {
		return membershipCode;
	}

	public void setMembershipCode(String membershipCode) {
		this.membershipCode = membershipCode;
	}

	public Integer getRank() {
		return rank;
	}

	public void setRank(Integer rank) {
		this.rank = rank;
	}

	public String getUpgradeTips() {
		return upgradeTips;
	}

	public void setUpgradeTips(String upgradeTips) {
		this.upgradeTips = upgradeTips;
	}
	

}